<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17背景色和前景色</title>
    <style>
        .box1 {
            /* color: pink; */
            border: 2px solid;
            background-color: skyblue;
        }

        .box2 {
            /* color: pink; */
            /* border: 2px solid; */
            background-color: pink;
            border-top: 2px solid purple;
        }
    </style>
</head>

<body>
    <div class="box1">
        我是一个div
    </div>
    <div class="box2">
        我是一个div
    </div>
</body>

</html>